package com.finace.money.data.bean;

import com.finace.money.common.util.StringUtil;

/**
 * Created by zhangpeng on 2018/1/4.
 */

public class QryTradeBean extends BaseEntity {


    /**
     * Trade : {"xdate":20180104,"xtime":140519,"xtime_str":"14:5:19","symbol":"rb1805","side":true,"xsize":1,"xprice":3792,"account":"1880003","security_type":"FUT","currency":"RMB","id":"636506096915710479","exchange":"SHFE","trade_id":"4589","commission":3.792,"profit":0,"offset_flag":"OPEN","offset_flag_str":"开仓"}
     * is_last : true
     * rsp_info : {"error_id":0,"error_message":""}
     */

    private TradeBean Trade;
    private boolean is_last;
    private RspInfoBean rsp_info;

    public TradeBean getTrade() {
        return Trade;
    }

    public void setTrade(TradeBean Trade) {
        this.Trade = Trade;
    }

    public boolean isIs_last() {
        return is_last;
    }

    public void setIs_last(boolean is_last) {
        this.is_last = is_last;
    }

    public RspInfoBean getRsp_info() {
        return rsp_info;
    }

    public void setRsp_info(RspInfoBean rsp_info) {
        this.rsp_info = rsp_info;
    }

    public static class TradeBean extends BaseEntity {
        /**
         * xdate : 20180104
         * xtime : 140519
         * xtime_str : 14:5:19
         * symbol : rb1805
         * side : true
         * xsize : 1
         * xprice : 3792.0
         * account : 1880003
         * security_type : FUT
         * currency : RMB
         * id : 636506096915710479
         * exchange : SHFE
         * trade_id : 4589
         * commission : 3.792
         * profit : 0.0
         * offset_flag : OPEN
         * offset_flag_str : 开仓
         */

        private int xdate;
        private int xtime;
        private String xtime_str;
        private String symbol;
        private boolean side;
        private int xsize;
        private double xprice;
        private String account;
        private String security_type;
        private String currency;
        private String id;
        private String exchange;
        private String trade_id;
        private double commission;
        private double profit;
        private String offset_flag;
        private String offset_flag_str;

        public int getXdate() {
            return xdate;
        }

        public void setXdate(int xdate) {
            this.xdate = xdate;
        }

        public int getXtime() {
            return xtime;
        }

        public void setXtime(int xtime) {
            this.xtime = xtime;
        }

        public String getXtime_str() {
            return xtime_str;
        }

        public void setXtime_str(String xtime_str) {
            this.xtime_str = xtime_str;
        }

        public String getSymbol() {
            return symbol;
        }

        public void setSymbol(String symbol) {
            this.symbol = symbol;
        }

        public boolean isSide() {
            return side;
        }

        public void setSide(boolean side) {
            this.side = side;
        }

        public int getXsize() {
            return xsize;
        }

        public void setXsize(int xsize) {
            this.xsize = xsize;
        }

        public double getXprice() {
            return Double.valueOf(StringUtil.getDecimal(xprice));
        }

        public void setXprice(double xprice) {
            this.xprice = xprice;
        }

        public String getAccount() {
            return account;
        }

        public void setAccount(String account) {
            this.account = account;
        }

        public String getSecurity_type() {
            return security_type;
        }

        public void setSecurity_type(String security_type) {
            this.security_type = security_type;
        }

        public String getCurrency() {
            return currency;
        }

        public void setCurrency(String currency) {
            this.currency = currency;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getExchange() {
            return exchange;
        }

        public void setExchange(String exchange) {
            this.exchange = exchange;
        }

        public String getTrade_id() {
            return trade_id;
        }

        public void setTrade_id(String trade_id) {
            this.trade_id = trade_id;
        }

        public double getCommission() {
            return commission;
        }

        public void setCommission(double commission) {
            this.commission = commission;
        }

        public double getProfit() {
            return profit;
        }

        public void setProfit(double profit) {
            this.profit = profit;
        }

        public String getOffset_flag() {
            return offset_flag;
        }

        public void setOffset_flag(String offset_flag) {
            this.offset_flag = offset_flag;
        }

        public String getOffset_flag_str() {
            return offset_flag_str;
        }

        public void setOffset_flag_str(String offset_flag_str) {
            this.offset_flag_str = offset_flag_str;
        }
    }
}
